package org.atfeihu.springcloud.alibaba.controller;

import lombok.extern.slf4j.Slf4j;
import org.atfeihu.springcloud.entities.CommonResult;
import org.atfeihu.springcloud.service.PaymentFeignService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author wangfeihu
 * @create 2021/9/2 14:49
 */
@RestController
@Slf4j
public class OrderFeignController {

    @Resource
    private PaymentFeignService paymentFeignService;

    @GetMapping("/consumer/payment/get/{id}")
    public CommonResult getPaymentById(@PathVariable Long id) {
        return paymentFeignService.getPaymentById(id);
    }

    @GetMapping("/consumer/payment/feign/timeout")
    public String getPaymentFeignTimeout() {
        return paymentFeignService.paymentFeignTimeout();
    }
}
